package com.atguigu03_extends.ex2;

public class Cylinder extends Circle{//圆柱
    private double length;

    public Cylinder() {
        this.length = 1;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double findVolume(){
        return super.findArea()*length;
    }

    public double findArea(){  //表面积
        double result;
        result=2*super.findArea()+2*getR()*Math.PI*length;
        return result;
    }
}
